﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="Stylesheet" type="text/css" media="screen" href="Screen.css" />
  <title>StpCallback_EnableForwarding</title>
</head>
<body>
	<h3>StpCallback_EnableForwarding</h3>
	<hr />
<pre>
void StpCallback_EnableForwarding
(
    BRIDGE* bridge,
    int     portIndex,
    int     treeIndex,
    bool    enable
);
</pre>
	<h4>
		Summary</h4>
	<p>
		Application-defined function that must enable or disable forwarding on a physical port.</p>
	<p>
		<code>StpCallback_EnableForwarding</code> is a placeholder name used throughout this documentation. The 
		application may name this callback differently.</p>
	<h4>
		Parameters</h4>
	<dl>
		<dt>bridge</dt>
		<dd>The application receives in this parameter a pointer to the bridge object returned by
			<a href="STP_CreateBridge.html">STP_CreateBridge</a>.</dd>
		<dt>portIndex</dt>
		<dd>The application receives in this parameter the zero-based index of the port for which 
			forwarding is to be enabled or disabled.</dd>
		<dt>treeIndex</dt>
		<dd>The application receives in this parameter the zero-based index of the spanning tree for 
			which forwarding is to be enabled or disabled. This is always 0 for RSTP. Since the library 
			currently supports only one MSTP spanning tree (the CIST tree), it is always 0 also for 
			MSTP with the current library code.</dd>
		<dt>enable</dt>
		<dd>The application receives in this parameter <code>true</code> if forwarding is to be enabled,
			<code>false</code> if the forwarding is to be disabled.</dd>
	</dl>
	<h4>
		Remarks</h4>
		<p>How the application enables or disables forwarding on physical ports depends on the 
			hardware (the type of the bridge IC). This is usually realized by writing to the internal registers 
			of the bridge IC.</p>
	<p>
		This function must wait until the hardware has finished enabling or disabling forwarding 
		(i.e., it must not just initiate the hardware action and return).</p>
</body>
</html>
